package com.example.safeassistan.train.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.safeassistan.R;

import java.util.List;


public class PaperResultSingleAdapter extends BaseQuickAdapter<Integer, BaseViewHolder> {

    public PaperResultSingleAdapter(List<Integer> data) {
        super(R.layout.item_answer_card, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Integer item) {
        switch (item) {
            case 1:
                helper.getView(R.id.tvNumber).setBackgroundResource(R.drawable.blue_circle_48);
                break;
            case 2:
                helper.getView(R.id.tvNumber).setBackgroundResource(R.drawable.gray_circle_48);
                break;
            case 3:
                helper.getView(R.id.tvNumber).setBackgroundResource(R.drawable.yellow_circle_48);
                break;
        }
        helper.setText(R.id.tvNumber,(helper.getPosition()+1)+"");
    }
}
